package com.hntnbs.rabbitmq.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MQUtil {
    private static CommonSender commonSender;

    @Autowired
    public void setCommonSender(CommonSender commonSender) {
        MQUtil.commonSender = commonSender;
    }

    public static void send(String exchange, String routeKey, String message) {
        commonSender.send(exchange, routeKey, message);
    }

}
